#pragma once

#include <windows.h>

class TextMetrics;
class Text;
class ScrollBar;
class WindowMetrics;
class Caret
{
public:
	void SetCaret(bool rememberPrevX = true, bool scrollToCaret = true);
	void DestroyCaret();
public:
	int GetPrevX();
	void SetOverlap(bool overlap);
public:
	void Init(HWND hWnd, Text* text, TextMetrics* tm, ScrollBar* scroll, WindowMetrics* wm);
public:
	Caret(void);
	~Caret(void);
private:
	HWND hWnd;
	Text* text;
	TextMetrics* textMetrics;
	WindowMetrics* wm;
	ScrollBar* scroll;

	int PrevX;
	bool overlap;
private:
};
